path_rotate

Rotates the given path with respect to its center.

语法:

path_rotate(index, angle);


参数 描述
index The index of the path to flip.
角度 The angle of rotation degrees.


返回: N/A(无返回值)


描述

You can use this function to rotate a given path around its center. Remember that in GameMaker Studio 2 (unless you are using physics) the angles are calculated counter-clockwise, so rotating the path by 90 degrees would rotate the path to the left. This function changes the actual path resource, and so will permanently affect how the path is used by all instances in the game from the moment the function is used until the end of the game.


例如:

path_rotate(path0, 90);

This would rotate path0 90 degrees counterclockwise.


上一页: Changing Paths
下一页: path_rescale
© Copyright YoYo Games Ltd. 2018 All Rights Reserved